/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LoginJFrame.java
 *
 * Created on 05/05/2009, 19:21:32
 */

package br.com.fatecpg.mdioficina;

import javax.swing.ImageIcon;

/**
 *
 * @author Fatec
 */
public class LoginJFrame extends javax.swing.JFrame {

    /** Creates new form LoginJFrame */
    public LoginJFrame() {
        initComponents();

          try{
        ImageIcon icon = new javax.swing.ImageIcon(getClass().getResource("/br/com/fatecpg/images/logo_easymec_24x24.png"));
        this.setIconImage(icon.getImage());
    }
    catch(Exception e) {
        System.out.println("Icone erro:\n" + e.getMessage());
}

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel = new javax.swing.JPanel();
        UsuáriojLabel = new javax.swing.JLabel();
        UsuáriojTextField = new javax.swing.JTextField();
        SenhajLabel = new javax.swing.JLabel();
        SenhajPasswordField = new javax.swing.JPasswordField();
        CancelarjButton = new javax.swing.JButton();
        ConectarjButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("EasyMec - Login");
        setBackground(new java.awt.Color(199, 204, 213));

        jPanel.setBackground(new java.awt.Color(199, 204, 213));

        UsuáriojLabel.setText("Usuário:");

        UsuáriojTextField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UsuáriojTextFieldActionPerformed(evt);
            }
        });

        SenhajLabel.setText("Senha:");

        CancelarjButton.setBackground(new java.awt.Color(209, 209, 230));
        CancelarjButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/fatecpg/images/botao_cancela_24x24.png"))); // NOI18N
        CancelarjButton.setText("Cancelar");
        CancelarjButton.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        CancelarjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CancelarjButtonActionPerformed(evt);
            }
        });

        ConectarjButton.setBackground(new java.awt.Color(209, 209, 230));
        ConectarjButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/fatecpg/images/botao_conectar_24x24.png"))); // NOI18N
        ConectarjButton.setText("Conectar");
        ConectarjButton.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        javax.swing.GroupLayout jPanelLayout = new javax.swing.GroupLayout(jPanel);
        jPanel.setLayout(jPanelLayout);
        jPanelLayout.setHorizontalGroup(
            jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(UsuáriojLabel)
                    .addComponent(SenhajLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(UsuáriojTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
                    .addComponent(SenhajPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelLayout.createSequentialGroup()
                .addContainerGap(10, Short.MAX_VALUE)
                .addComponent(CancelarjButton, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                .addComponent(ConectarjButton, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10))
        );
        jPanelLayout.setVerticalGroup(
            jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(UsuáriojLabel)
                    .addComponent(UsuáriojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(SenhajLabel)
                    .addComponent(SenhajPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(jPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CancelarjButton)
                    .addComponent(ConectarjButton))
                .addGap(22, 22, 22))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void CancelarjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CancelarjButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CancelarjButtonActionPerformed

    private void UsuáriojTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UsuáriojTextFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_UsuáriojTextFieldActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new LoginJFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton CancelarjButton;
    private javax.swing.JButton ConectarjButton;
    private javax.swing.JLabel SenhajLabel;
    private javax.swing.JPasswordField SenhajPasswordField;
    private javax.swing.JLabel UsuáriojLabel;
    private javax.swing.JTextField UsuáriojTextField;
    private javax.swing.JPanel jPanel;
    // End of variables declaration//GEN-END:variables

}
